<?php

$clientLibraryPath = 'class';
$oldPath = set_include_path(get_include_path() . PATH_SEPARATOR . $clientLibraryPath);
require_once 'Zend/Loader.php'; // the Zend dir must be in your include_path
Zend_Loader::loadClass('Zend_Gdata_YouTube');
$yt = new Zend_Gdata_YouTube();

function getVideo($id) {
    global $yt;
    $videoEntry = $yt->getVideoEntry($id);
    $video['title'] = $videoEntry->getVideoTitle();
    $video['thumb'] = $videoEntry->getVideoThumbnails();
    $video['description'] = $videoEntry->getVideoDescription();
    $video['views'] = $videoEntry->getVideoViewCount();
    $video['id'] = $videoEntry->getVideoId();
    return $video;
}

?>
